package org.ipower.examsystem.dao.impl;

import java.util.List;
import org.ipower.examsystem.dao.ItemAnswerResolveDao;
import org.ipower.examsystem.domain.ItemAnswerResolve;
import org.ipower.examsystem.service.AnswerResolve;

/**
 * 题目答案解析数据访问实现类。
 * @author young
 */
public class ItemAnswerResolveDaoImpl extends ModuleGenericDaoImpl<ItemAnswerResolve> implements ItemAnswerResolveDao {

    @Override
    public AnswerResolve loadResolve(String topicsID) {
        if(topicsID != null && !topicsID.isEmpty()){
            ItemAnswerResolve item = this.load(topicsID);
            if(item != null){
                AnswerResolve data = new AnswerResolve();
                data.setResolve(item.getResolve());
                data.setImgUri(item.getImgUri());
                return data;
            }
        }
        return null;
    }
}